using System;
using System.Data;
using System.Collections;
using APP.QUANLY.Common;

namespace RMAS.DAL
{
    /// <summary>
    /// Summary description for DM_GROUP.
    /// </summary>
    public class DM_GROUP
    {
              private Int32 _GID;
      private string _GName;
      private string _GDes;
      private string _GPer;
      private Int16 _GStatus;
        private bool isExisting;
        #region Properties
        public bool IsExisting
        {
              get{return isExisting;}
              set{isExisting = value;}
        }
	      public bool IsSetGID; 
      public bool IsGIDNullable   
      { 
	 get { return false;  } 
      }
      public Int32 GID
      {
         get { return _GID; }
         set 
	    { 
 		 _GID = value;
		IsSetGID = true;
 	    }
      }
    public bool IsSetGName; 
    public bool IsGNameNullable   
    { 
		get { return false;  } 
    }
    public string GName
    {
        get{ return _GName;  }
        set
		{
			_GName = value;
			IsSetGName = true;
		}
    }
    public bool IsSetGDes; 
    public bool IsGDesNullable   
    { 
		get { return false;  } 
    }
    public string GDes
    {
        get{ return _GDes;  }
        set
		{
			_GDes = value;
			IsSetGDes = true;
		}
    }
    public bool IsSetGPer; 
    public bool IsGPerNullable   
    { 
		get { return false;  } 
    }
    public string GPer
    {
        get{ return _GPer;  }
        set
		{
			_GPer = value;
			IsSetGPer = true;
		}
    }
    public bool IsSetGStatus; 
    public bool IsGStatusNullable   
    { 
		get { return false;  } 
    }
    public Int16 GStatus
    {
        get{ return _GStatus;  }
        set
		{
			_GStatus = value;
			IsSetGStatus = true;
		}
    }

        #endregion

        #region Constructors
        public DM_GROUP()
        {
            Reset();
        }
        public DM_GROUP(DM_GROUP obj)
        {
            	this._GID = obj.GID;
	this._GName = obj.GName;
	this._GDes = obj.GDes;
	this._GPer = obj.GPer;
	this._GStatus = obj.GStatus;
        }
        #endregion

        public void Reset()
        {
                     _GID = EmptyValues.v_Int32;
         _GName = EmptyValues.v_string;
         _GDes = EmptyValues.v_string;
         _GPer = EmptyValues.v_string;
         _GStatus = EmptyValues.v_Int16;
        }

         
        #region Hidden

        /*
        private void readProperties(IDataReader reader)
        {
            try
            {
                                if(!(reader["GID"] is DBNull))
		{
			obj.GID = (Int32)reader["GID"];
		}
                if(!(reader["GName"] is DBNull))
		{
			obj.GName = (string)reader["GName"];
		}
                if(!(reader["GDes"] is DBNull))
		{
			obj.GDes = (string)reader["GDes"];
		}
                if(!(reader["GPer"] is DBNull))
		{
			obj.GPer = (string)reader["GPer"];
		}
                if(!(reader["GStatus"] is DBNull))
		{
			obj.GStatus = (Int16)reader["GStatus"];
		}
//            _GID = (reader["GID"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["GID"];
//            _GName = (reader["GName"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["GName"];
//            _GDes = (reader["GDes"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["GDes"];
//            _GPer = (reader["GPer"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["GPer"];
//            _GStatus = (reader["GStatus"] is DBNull)?DalTools.EmptyValues.v_Int16:(Int16)reader["GStatus"];
            }
            catch (Exception ex)
            {
                throw new DalException("Failed to read properties from DataReader.", ex);
            }
        } 
        */

        #endregion


        public void Fill(Int32 GID, string GName, string GDes, string GPer, Int16 GStatus)
        {
                     this._GID = GID;
         this._GName = GName;
         this._GDes = GDes;
         this._GPer = GPer;
         this._GStatus = GStatus;
        }
    }
}